{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "from machine_lib import *\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "b'{\"user\":{\"id\":\"JW80368\"},\"token\":{\"expiry\":14400.0},\"permissions\":[\"CONSULTANT\",\"MULTI_SIMULATION\",\"PROD_ALPHAS\",\"REFERRAL\",\"SUPER_ALPHA\",\"VISUALIZATION\",\"WORKDAY\"]}'\n",
      "next_csv_file: USA_fo_analyst92.csv\n",
      "len of pools = 132\n",
      "b'{\"user\":{\"id\":\"JW80368\"},\"token\":{\"expiry\":14400.0},\"permissions\":[\"CONSULTANT\",\"MULTI_SIMULATION\",\"PROD_ALPHAS\",\"REFERRAL\",\"SUPER_ALPHA\",\"VISUALIZATION\",\"WORKDAY\"]}'\n",
      "pool 0 task 9 post done\n",
      "pool 0 task 0 simulate done\n",
      "pool 0 task 1 simulate done\n",
      "pool 0 task 2 simulate done\n",
      "pool 0 task 3 simulate done\n",
      "pool 0 task 4 simulate done\n",
      "pool 0 task 5 simulate done\n",
      "pool 0 task 6 simulate done\n",
      "pool 0 task 7 simulate done\n",
      "pool 0 task 8 simulate done\n",
      "pool 0 task 9 simulate done\n",
      "pool 1 task 9 post done\n",
      "pool 1 task 0 simulate done\n",
      "pool 1 task 1 simulate done\n",
      "pool 1 task 2 simulate done\n",
      "pool 1 task 3 simulate done\n",
      "pool 1 task 4 simulate done\n",
      "pool 1 task 5 simulate done\n",
      "pool 1 task 6 simulate done\n",
      "pool 1 task 7 simulate done\n",
      "pool 1 task 8 simulate done\n",
      "pool 1 task 9 simulate done\n",
      "pool 2 task 9 post done\n",
      "pool 2 task 0 simulate done\n",
      "pool 2 task 1 simulate done\n",
      "pool 2 task 2 simulate done\n",
      "pool 2 task 3 simulate done\n",
      "pool 2 task 4 simulate done\n",
      "pool 2 task 5 simulate done\n",
      "pool 2 task 6 simulate done\n",
      "pool 2 task 7 simulate done\n",
      "pool 2 task 8 simulate done\n",
      "pool 2 task 9 simulate done\n",
      "pool 3 task 9 post done\n",
      "pool 3 task 0 simulate done\n",
      "pool 3 task 1 simulate done\n",
      "pool 3 task 2 simulate done\n",
      "pool 3 task 3 simulate done\n",
      "pool 3 task 4 simulate done\n",
      "pool 3 task 5 simulate done\n",
      "pool 3 task 6 simulate done\n",
      "pool 3 task 7 simulate done\n",
      "pool 3 task 8 simulate done\n",
      "pool 3 task 9 simulate done\n",
      "pool 4 task 9 post done\n",
      "pool 4 task 0 simulate done\n",
      "pool 4 task 1 simulate done\n",
      "pool 4 task 2 simulate done\n",
      "pool 4 task 3 simulate done\n",
      "pool 4 task 4 simulate done\n",
      "pool 4 task 5 simulate done\n",
      "pool 4 task 6 simulate done\n",
      "pool 4 task 7 simulate done\n",
      "pool 4 task 8 simulate done\n",
      "pool 4 task 9 simulate done\n",
      "pool 5 task 9 post done\n",
      "pool 5 task 0 simulate done\n",
      "pool 5 task 1 simulate done\n",
      "pool 5 task 2 simulate done\n",
      "pool 5 task 3 simulate done\n",
      "pool 5 task 4 simulate done\n",
      "pool 5 task 5 simulate done\n",
      "pool 5 task 6 simulate done\n",
      "pool 5 task 7 simulate done\n",
      "pool 5 task 8 simulate done\n",
      "pool 5 task 9 simulate done\n",
      "pool 6 task 9 post done\n",
      "pool 6 task 0 simulate done\n",
      "pool 6 task 1 simulate done\n",
      "pool 6 task 2 simulate done\n",
      "pool 6 task 3 simulate done\n",
      "pool 6 task 4 simulate done\n",
      "pool 6 task 5 simulate done\n",
      "pool 6 task 6 simulate done\n",
      "pool 6 task 7 simulate done\n",
      "pool 6 task 8 simulate done\n",
      "pool 6 task 9 simulate done\n",
      "pool 7 task 9 post done\n",
      "pool 7 task 0 simulate done\n",
      "pool 7 task 1 simulate done\n",
      "pool 7 task 2 simulate done\n",
      "pool 7 task 3 simulate done\n",
      "pool 7 task 4 simulate done\n",
      "pool 7 task 5 simulate done\n",
      "pool 7 task 6 simulate done\n",
      "pool 7 task 7 simulate done\n",
      "pool 7 task 8 simulate done\n",
      "pool 7 task 9 simulate done\n",
      "pool 8 task 9 post done\n",
      "pool 8 task 0 simulate done\n",
      "pool 8 task 1 simulate done\n",
      "pool 8 task 2 simulate done\n",
      "pool 8 task 3 simulate done\n",
      "pool 8 task 4 simulate done\n",
      "pool 8 task 5 simulate done\n",
      "pool 8 task 6 simulate done\n",
      "pool 8 task 7 simulate done\n",
      "pool 8 task 8 simulate done\n",
      "pool 8 task 9 simulate done\n",
      "pool 9 task 9 post done\n",
      "pool 9 task 0 simulate done\n",
      "pool 9 task 1 simulate done\n",
      "pool 9 task 2 simulate done\n",
      "pool 9 task 3 simulate done\n",
      "pool 9 task 4 simulate done\n",
      "pool 9 task 5 simulate done\n",
      "pool 9 task 6 simulate done\n",
      "pool 9 task 7 simulate done\n",
      "pool 9 task 8 simulate done\n",
      "pool 9 task 9 simulate done\n",
      "pool 10 task 9 post done\n",
      "pool 10 task 0 simulate done\n",
      "pool 10 task 1 simulate done\n",
      "pool 10 task 2 simulate done\n",
      "pool 10 task 3 simulate done\n",
      "pool 10 task 4 simulate done\n",
      "pool 10 task 5 simulate done\n",
      "pool 10 task 6 simulate done\n",
      "pool 10 task 7 simulate done\n",
      "pool 10 task 8 simulate done\n",
      "pool 10 task 9 simulate done\n",
      "pool 11 task 9 post done\n",
      "pool 11 task 0 simulate done\n",
      "pool 11 task 1 simulate done\n",
      "pool 11 task 2 simulate done\n",
      "pool 11 task 3 simulate done\n",
      "pool 11 task 4 simulate done\n",
      "pool 11 task 5 simulate done\n",
      "pool 11 task 6 simulate done\n",
      "pool 11 task 7 simulate done\n",
      "pool 11 task 8 simulate done\n",
      "pool 11 task 9 simulate done\n",
      "pool 12 task 9 post done\n",
      "pool 12 task 0 simulate done\n",
      "pool 12 task 1 simulate done\n",
      "pool 12 task 2 simulate done\n",
      "pool 12 task 3 simulate done\n",
      "pool 12 task 4 simulate done\n",
      "pool 12 task 5 simulate done\n",
      "pool 12 task 6 simulate done\n",
      "pool 12 task 7 simulate done\n",
      "pool 12 task 8 simulate done\n",
      "pool 12 task 9 simulate done\n",
      "pool 13 task 9 post done\n",
      "pool 13 task 0 simulate done\n",
      "pool 13 task 1 simulate done\n",
      "pool 13 task 2 simulate done\n",
      "pool 13 task 3 simulate done\n",
      "pool 13 task 4 simulate done\n",
      "pool 13 task 5 simulate done\n",
      "pool 13 task 6 simulate done\n",
      "pool 13 task 7 simulate done\n",
      "pool 13 task 8 simulate done\n",
      "pool 13 task 9 simulate done\n",
      "pool 14 task 9 post done\n",
      "pool 14 task 0 simulate done\n",
      "pool 14 task 1 simulate done\n",
      "pool 14 task 2 simulate done\n",
      "pool 14 task 3 simulate done\n",
      "pool 14 task 4 simulate done\n",
      "pool 14 task 5 simulate done\n",
      "pool 14 task 6 simulate done\n",
      "pool 14 task 7 simulate done\n",
      "pool 14 task 8 simulate done\n",
      "pool 14 task 9 simulate done\n",
      "pool 15 task 9 post done\n",
      "pool 15 task 0 simulate done\n",
      "pool 15 task 1 simulate done\n",
      "pool 15 task 2 simulate done\n",
      "pool 15 task 3 simulate done\n",
      "pool 15 task 4 simulate done\n",
      "pool 15 task 5 simulate done\n",
      "pool 15 task 6 simulate done\n",
      "pool 15 task 7 simulate done\n",
      "pool 15 task 8 simulate done\n",
      "pool 15 task 9 simulate done\n",
      "pool 16 task 9 post done\n",
      "pool 16 task 0 simulate done\n",
      "pool 16 task 1 simulate done\n",
      "pool 16 task 2 simulate done\n",
      "pool 16 task 3 simulate done\n",
      "pool 16 task 4 simulate done\n",
      "pool 16 task 5 simulate done\n",
      "pool 16 task 6 simulate done\n",
      "pool 16 task 7 simulate done\n",
      "pool 16 task 8 simulate done\n",
      "pool 16 task 9 simulate done\n",
      "pool 17 task 9 post done\n",
      "pool 17 task 0 simulate done\n",
      "pool 17 task 1 simulate done\n",
      "pool 17 task 2 simulate done\n",
      "pool 17 task 3 simulate done\n",
      "pool 17 task 4 simulate done\n",
      "pool 17 task 5 simulate done\n",
      "pool 17 task 6 simulate done\n",
      "pool 17 task 7 simulate done\n",
      "pool 17 task 8 simulate done\n",
      "pool 17 task 9 simulate done\n",
      "pool 18 task 9 post done\n",
      "pool 18 task 0 simulate done\n",
      "pool 18 task 1 simulate done\n",
      "pool 18 task 2 simulate done\n",
      "pool 18 task 3 simulate done\n",
      "pool 18 task 4 simulate done\n",
      "pool 18 task 5 simulate done\n",
      "pool 18 task 6 simulate done\n",
      "pool 18 task 7 simulate done\n",
      "pool 18 task 8 simulate done\n",
      "pool 18 task 9 simulate done\n",
      "pool 19 task 9 post done\n",
      "pool 19 task 0 simulate done\n",
      "pool 19 task 1 simulate done\n",
      "pool 19 task 2 simulate done\n",
      "pool 19 task 3 simulate done\n",
      "pool 19 task 4 simulate done\n",
      "pool 19 task 5 simulate done\n",
      "pool 19 task 6 simulate done\n",
      "pool 19 task 7 simulate done\n",
      "pool 19 task 8 simulate done\n",
      "pool 19 task 9 simulate done\n",
      "pool 20 task 9 post done\n",
      "pool 20 task 0 simulate done\n",
      "pool 20 task 1 simulate done\n",
      "pool 20 task 2 simulate done\n",
      "pool 20 task 3 simulate done\n",
      "pool 20 task 4 simulate done\n",
      "pool 20 task 5 simulate done\n",
      "pool 20 task 6 simulate done\n",
      "pool 20 task 7 simulate done\n",
      "pool 20 task 8 simulate done\n",
      "pool 20 task 9 simulate done\n",
      "pool 21 task 9 post done\n",
      "pool 21 task 0 simulate done\n",
      "pool 21 task 1 simulate done\n",
      "pool 21 task 2 simulate done\n",
      "pool 21 task 3 simulate done\n",
      "pool 21 task 4 simulate done\n",
      "pool 21 task 5 simulate done\n",
      "pool 21 task 6 simulate done\n",
      "pool 21 task 7 simulate done\n",
      "pool 21 task 8 simulate done\n",
      "pool 21 task 9 simulate done\n",
      "pool 22 task 9 post done\n",
      "pool 22 task 0 simulate done\n",
      "pool 22 task 1 simulate done\n",
      "pool 22 task 2 simulate done\n",
      "pool 22 task 3 simulate done\n",
      "pool 22 task 4 simulate done\n",
      "pool 22 task 5 simulate done\n",
      "pool 22 task 6 simulate done\n",
      "pool 22 task 7 simulate done\n",
      "pool 22 task 8 simulate done\n",
      "pool 22 task 9 simulate done\n",
      "pool 23 task 9 post done\n",
      "pool 23 task 0 simulate done\n",
      "pool 23 task 1 simulate done\n",
      "pool 23 task 2 simulate done\n",
      "pool 23 task 3 simulate done\n",
      "pool 23 task 4 simulate done\n",
      "pool 23 task 5 simulate done\n",
      "pool 23 task 6 simulate done\n",
      "pool 23 task 7 simulate done\n",
      "pool 23 task 8 simulate done\n",
      "pool 23 task 9 simulate done\n",
      "pool 24 task 9 post done\n",
      "pool 24 task 0 simulate done\n",
      "pool 24 task 1 simulate done\n",
      "pool 24 task 2 simulate done\n",
      "pool 24 task 3 simulate done\n",
      "pool 24 task 4 simulate done\n",
      "pool 24 task 5 simulate done\n",
      "pool 24 task 6 simulate done\n",
      "pool 24 task 7 simulate done\n",
      "pool 24 task 8 simulate done\n",
      "pool 24 task 9 simulate done\n",
      "pool 25 task 9 post done\n",
      "pool 25 task 0 simulate done\n",
      "pool 25 task 1 simulate done\n",
      "pool 25 task 2 simulate done\n",
      "pool 25 task 3 simulate done\n",
      "pool 25 task 4 simulate done\n",
      "pool 25 task 5 simulate done\n",
      "pool 25 task 6 simulate done\n",
      "pool 25 task 7 simulate done\n",
      "pool 25 task 8 simulate done\n",
      "pool 25 task 9 simulate done\n",
      "pool 26 task 9 post done\n",
      "pool 26 task 0 simulate done\n",
      "pool 26 task 1 simulate done\n",
      "pool 26 task 2 simulate done\n",
      "pool 26 task 3 simulate done\n",
      "pool 26 task 4 simulate done\n",
      "pool 26 task 5 simulate done\n",
      "pool 26 task 6 simulate done\n",
      "pool 26 task 7 simulate done\n",
      "pool 26 task 8 simulate done\n",
      "pool 26 task 9 simulate done\n",
      "pool 27 task 9 post done\n",
      "pool 27 task 0 simulate done\n",
      "pool 27 task 1 simulate done\n",
      "pool 27 task 2 simulate done\n",
      "pool 27 task 3 simulate done\n",
      "pool 27 task 4 simulate done\n",
      "pool 27 task 5 simulate done\n",
      "pool 27 task 6 simulate done\n",
      "pool 27 task 7 simulate done\n",
      "pool 27 task 8 simulate done\n",
      "pool 27 task 9 simulate done\n",
      "pool 28 task 9 post done\n",
      "pool 28 task 0 simulate done\n",
      "pool 28 task 1 simulate done\n",
      "pool 28 task 2 simulate done\n",
      "pool 28 task 3 simulate done\n",
      "pool 28 task 4 simulate done\n",
      "pool 28 task 5 simulate done\n",
      "pool 28 task 6 simulate done\n",
      "pool 28 task 7 simulate done\n",
      "pool 28 task 8 simulate done\n",
      "pool 28 task 9 simulate done\n",
      "pool 29 task 9 post done\n",
      "pool 29 task 0 simulate done\n",
      "pool 29 task 1 simulate done\n",
      "pool 29 task 2 simulate done\n",
      "pool 29 task 3 simulate done\n",
      "pool 29 task 4 simulate done\n",
      "pool 29 task 5 simulate done\n",
      "pool 29 task 6 simulate done\n",
      "pool 29 task 7 simulate done\n",
      "pool 29 task 8 simulate done\n",
      "pool 29 task 9 simulate done\n",
      "pool 30 task 9 post done\n",
      "pool 30 task 0 simulate done\n",
      "pool 30 task 1 simulate done\n",
      "pool 30 task 2 simulate done\n",
      "pool 30 task 3 simulate done\n",
      "pool 30 task 4 simulate done\n",
      "pool 30 task 5 simulate done\n",
      "pool 30 task 6 simulate done\n",
      "pool 30 task 7 simulate done\n",
      "pool 30 task 8 simulate done\n",
      "pool 30 task 9 simulate done\n",
      "pool 31 task 9 post done\n",
      "pool 31 task 0 simulate done\n",
      "pool 31 task 1 simulate done\n",
      "pool 31 task 2 simulate done\n",
      "pool 31 task 3 simulate done\n",
      "pool 31 task 4 simulate done\n",
      "pool 31 task 5 simulate done\n",
      "pool 31 task 6 simulate done\n",
      "pool 31 task 7 simulate done\n",
      "pool 31 task 8 simulate done\n",
      "pool 31 task 9 simulate done\n",
      "pool 32 task 9 post done\n",
      "pool 32 task 0 simulate done\n",
      "pool 32 task 1 simulate done\n",
      "pool 32 task 2 simulate done\n",
      "pool 32 task 3 simulate done\n",
      "pool 32 task 4 simulate done\n",
      "pool 32 task 5 simulate done\n",
      "pool 32 task 6 simulate done\n",
      "pool 32 task 7 simulate done\n",
      "pool 32 task 8 simulate done\n",
      "pool 32 task 9 simulate done\n",
      "pool 33 task 9 post done\n",
      "pool 33 task 0 simulate done\n",
      "pool 33 task 1 simulate done\n",
      "pool 33 task 2 simulate done\n",
      "pool 33 task 3 simulate done\n",
      "pool 33 task 4 simulate done\n",
      "pool 33 task 5 simulate done\n",
      "pool 33 task 6 simulate done\n",
      "pool 33 task 7 simulate done\n",
      "pool 33 task 8 simulate done\n",
      "pool 33 task 9 simulate done\n",
      "pool 34 task 9 post done\n",
      "pool 34 task 0 simulate done\n",
      "pool 34 task 1 simulate done\n",
      "pool 34 task 2 simulate done\n",
      "pool 34 task 3 simulate done\n",
      "pool 34 task 4 simulate done\n",
      "pool 34 task 5 simulate done\n",
      "pool 34 task 6 simulate done\n",
      "pool 34 task 7 simulate done\n",
      "pool 34 task 8 simulate done\n",
      "pool 34 task 9 simulate done\n",
      "pool 35 task 9 post done\n",
      "pool 35 task 0 simulate done\n",
      "pool 35 task 1 simulate done\n",
      "pool 35 task 2 simulate done\n",
      "pool 35 task 3 simulate done\n",
      "pool 35 task 4 simulate done\n",
      "pool 35 task 5 simulate done\n",
      "pool 35 task 6 simulate done\n",
      "pool 35 task 7 simulate done\n",
      "pool 35 task 8 simulate done\n",
      "pool 35 task 9 simulate done\n",
      "pool 36 task 9 post done\n",
      "pool 36 task 0 simulate done\n",
      "pool 36 task 1 simulate done\n",
      "pool 36 task 2 simulate done\n",
      "pool 36 task 3 simulate done\n",
      "pool 36 task 4 simulate done\n",
      "pool 36 task 5 simulate done\n",
      "pool 36 task 6 simulate done\n",
      "pool 36 task 7 simulate done\n",
      "pool 36 task 8 simulate done\n",
      "pool 36 task 9 simulate done\n",
      "pool 37 task 9 post done\n",
      "pool 37 task 0 simulate done\n",
      "pool 37 task 1 simulate done\n",
      "pool 37 task 2 simulate done\n",
      "pool 37 task 3 simulate done\n",
      "pool 37 task 4 simulate done\n",
      "pool 37 task 5 simulate done\n",
      "pool 37 task 6 simulate done\n",
      "pool 37 task 7 simulate done\n",
      "pool 37 task 8 simulate done\n",
      "pool 37 task 9 simulate done\n",
      "pool 38 task 9 post done\n",
      "pool 38 task 0 simulate done\n",
      "pool 38 task 1 simulate done\n",
      "pool 38 task 2 simulate done\n",
      "pool 38 task 3 simulate done\n",
      "pool 38 task 4 simulate done\n",
      "pool 38 task 5 simulate done\n",
      "pool 38 task 6 simulate done\n",
      "pool 38 task 7 simulate done\n",
      "pool 38 task 8 simulate done\n",
      "pool 38 task 9 simulate done\n",
      "pool 39 task 9 post done\n",
      "pool 39 task 0 simulate done\n",
      "pool 39 task 1 simulate done\n",
      "pool 39 task 2 simulate done\n",
      "pool 39 task 3 simulate done\n",
      "pool 39 task 4 simulate done\n",
      "pool 39 task 5 simulate done\n",
      "pool 39 task 6 simulate done\n",
      "pool 39 task 7 simulate done\n",
      "pool 39 task 8 simulate done\n",
      "pool 39 task 9 simulate done\n",
      "pool 40 task 9 post done\n",
      "pool 40 task 0 simulate done\n",
      "pool 40 task 1 simulate done\n",
      "pool 40 task 2 simulate done\n",
      "pool 40 task 3 simulate done\n",
      "pool 40 task 4 simulate done\n",
      "pool 40 task 5 simulate done\n",
      "pool 40 task 6 simulate done\n",
      "pool 40 task 7 simulate done\n",
      "pool 40 task 8 simulate done\n",
      "pool 40 task 9 simulate done\n",
      "pool 41 task 9 post done\n",
      "pool 41 task 0 simulate done\n",
      "pool 41 task 1 simulate done\n",
      "pool 41 task 2 simulate done\n",
      "pool 41 task 3 simulate done\n",
      "pool 41 task 4 simulate done\n",
      "pool 41 task 5 simulate done\n",
      "pool 41 task 6 simulate done\n",
      "pool 41 task 7 simulate done\n",
      "pool 41 task 8 simulate done\n",
      "pool 41 task 9 simulate done\n",
      "pool 42 task 9 post done\n",
      "pool 42 task 0 simulate done\n",
      "pool 42 task 1 simulate done\n",
      "pool 42 task 2 simulate done\n",
      "pool 42 task 3 simulate done\n",
      "pool 42 task 4 simulate done\n",
      "pool 42 task 5 simulate done\n",
      "pool 42 task 6 simulate done\n",
      "pool 42 task 7 simulate done\n",
      "pool 42 task 8 simulate done\n",
      "pool 42 task 9 simulate done\n",
      "pool 43 task 9 post done\n",
      "pool 43 task 0 simulate done\n",
      "pool 43 task 1 simulate done\n",
      "pool 43 task 2 simulate done\n",
      "pool 43 task 3 simulate done\n",
      "pool 43 task 4 simulate done\n",
      "pool 43 task 5 simulate done\n",
      "pool 43 task 6 simulate done\n",
      "pool 43 task 7 simulate done\n",
      "pool 43 task 8 simulate done\n",
      "pool 43 task 9 simulate done\n",
      "pool 44 task 9 post done\n",
      "pool 44 task 0 simulate done\n",
      "pool 44 task 1 simulate done\n",
      "pool 44 task 2 simulate done\n",
      "pool 44 task 3 simulate done\n",
      "pool 44 task 4 simulate done\n",
      "pool 44 task 5 simulate done\n",
      "pool 44 task 6 simulate done\n",
      "pool 44 task 7 simulate done\n",
      "pool 44 task 8 simulate done\n",
      "pool 44 task 9 simulate done\n",
      "pool 45 task 9 post done\n",
      "pool 45 task 0 simulate done\n",
      "pool 45 task 1 simulate done\n",
      "pool 45 task 2 simulate done\n",
      "pool 45 task 3 simulate done\n",
      "pool 45 task 4 simulate done\n",
      "pool 45 task 5 simulate done\n",
      "pool 45 task 6 simulate done\n",
      "pool 45 task 7 simulate done\n",
      "pool 45 task 8 simulate done\n",
      "pool 45 task 9 simulate done\n",
      "pool 46 task 9 post done\n",
      "pool 46 task 0 simulate done\n",
      "pool 46 task 1 simulate done\n",
      "pool 46 task 2 simulate done\n",
      "pool 46 task 3 simulate done\n",
      "pool 46 task 4 simulate done\n",
      "pool 46 task 5 simulate done\n",
      "pool 46 task 6 simulate done\n",
      "pool 46 task 7 simulate done\n",
      "pool 46 task 8 simulate done\n",
      "pool 46 task 9 simulate done\n",
      "pool 47 task 9 post done\n",
      "pool 47 task 0 simulate done\n",
      "pool 47 task 1 simulate done\n",
      "pool 47 task 2 simulate done\n",
      "pool 47 task 3 simulate done\n",
      "pool 47 task 4 simulate done\n",
      "pool 47 task 5 simulate done\n",
      "pool 47 task 6 simulate done\n",
      "pool 47 task 7 simulate done\n",
      "pool 47 task 8 simulate done\n",
      "pool 47 task 9 simulate done\n",
      "pool 48 task 9 post done\n",
      "pool 48 task 0 simulate done\n",
      "look into: https://api.worldquantbrain.com/simulations/Gk7Vk3t95f18y11bVTqJwEf\n",
      "pool 48 task 1 simulate done\n",
      "Not complete : https://api.worldquantbrain.com/simulations/431AuS7lm4Sl9tMZIt4bUAe\n",
      "other\n",
      "pool 48 task 2 simulate done\n",
      "Not complete : https://api.worldquantbrain.com/simulations/JfL6M9nB4u1bPwYmrERl17\n",
      "other\n",
      "pool 48 task 3 simulate done\n",
      "Not complete : https://api.worldquantbrain.com/simulations/2I6DgO4ah4sac5GeheYlg0q\n",
      "other\n",
      "pool 48 task 4 simulate done\n",
      "Not complete : https://api.worldquantbrain.com/simulations/EDXBofJg4zacygbmoFDFhn\n",
      "other\n",
      "pool 48 task 5 simulate done\n",
      "Not complete : https://api.worldquantbrain.com/simulations/1yd77M84M54Ic2D1YP8bW0E\n",
      "other\n",
      "pool 48 task 6 simulate done\n",
      "Not complete : https://api.worldquantbrain.com/simulations/HAZnh3Cn59dckcSSUNUE9n\n",
      "other\n",
      "pool 48 task 7 simulate done\n",
      "Not complete : https://api.worldquantbrain.com/simulations/2fbbwVef44J8aRZ17LZzfLM7\n",
      "other\n",
      "pool 48 task 8 simulate done\n",
      "Not complete : https://api.worldquantbrain.com/simulations/4u3NGTUr59Sablv9Fi7MpN\n",
      "other\n",
      "pool 48 task 9 simulate done\n",
      "loc key error\n",
      "b'{\"user\":{\"id\":\"JW80368\"},\"token\":{\"expiry\":14400.0},\"permissions\":[\"CONSULTANT\",\"MULTI_SIMULATION\",\"PROD_ALPHAS\",\"REFERRAL\",\"SUPER_ALPHA\",\"VISUALIZATION\",\"WORKDAY\"]}'\n",
      "pool 49 task 9 post done\n",
      "pool 49 task 0 simulate done\n",
      "pool 49 task 1 simulate done\n",
      "pool 49 task 2 simulate done\n",
      "pool 49 task 3 simulate done\n",
      "pool 49 task 4 simulate done\n",
      "pool 49 task 5 simulate done\n",
      "pool 49 task 6 simulate done\n",
      "pool 49 task 7 simulate done\n",
      "pool 49 task 8 simulate done\n",
      "pool 50 task 9 post done\n",
      "pool 50 task 0 simulate done\n",
      "pool 50 task 1 simulate done\n",
      "pool 50 task 2 simulate done\n",
      "pool 50 task 3 simulate done\n",
      "pool 50 task 4 simulate done\n",
      "pool 50 task 5 simulate done\n",
      "pool 50 task 6 simulate done\n",
      "pool 50 task 7 simulate done\n",
      "pool 50 task 8 simulate done\n",
      "pool 50 task 9 simulate done\n",
      "pool 51 task 9 post done\n",
      "pool 51 task 0 simulate done\n",
      "pool 51 task 1 simulate done\n",
      "pool 51 task 2 simulate done\n",
      "pool 51 task 3 simulate done\n",
      "pool 51 task 4 simulate done\n",
      "pool 51 task 5 simulate done\n",
      "pool 51 task 6 simulate done\n",
      "pool 51 task 7 simulate done\n",
      "pool 51 task 8 simulate done\n",
      "pool 51 task 9 simulate done\n",
      "pool 52 task 9 post done\n",
      "pool 52 task 0 simulate done\n",
      "pool 52 task 1 simulate done\n",
      "pool 52 task 2 simulate done\n",
      "pool 52 task 3 simulate done\n",
      "pool 52 task 4 simulate done\n",
      "pool 52 task 5 simulate done\n",
      "pool 52 task 6 simulate done\n",
      "pool 52 task 7 simulate done\n",
      "pool 52 task 8 simulate done\n",
      "pool 52 task 9 simulate done\n",
      "pool 53 task 9 post done\n",
      "pool 53 task 0 simulate done\n",
      "pool 53 task 1 simulate done\n",
      "pool 53 task 2 simulate done\n",
      "pool 53 task 3 simulate done\n",
      "pool 53 task 4 simulate done\n",
      "pool 53 task 5 simulate done\n",
      "pool 53 task 6 simulate done\n",
      "pool 53 task 7 simulate done\n",
      "pool 53 task 8 simulate done\n",
      "pool 53 task 9 simulate done\n",
      "pool 54 task 9 post done\n",
      "pool 54 task 0 simulate done\n",
      "pool 54 task 1 simulate done\n",
      "pool 54 task 2 simulate done\n",
      "pool 54 task 3 simulate done\n",
      "pool 54 task 4 simulate done\n",
      "pool 54 task 5 simulate done\n",
      "pool 54 task 6 simulate done\n",
      "pool 54 task 7 simulate done\n",
      "pool 54 task 8 simulate done\n",
      "pool 54 task 9 simulate done\n",
      "pool 55 task 9 post done\n",
      "pool 55 task 0 simulate done\n",
      "pool 55 task 1 simulate done\n",
      "pool 55 task 2 simulate done\n",
      "pool 55 task 3 simulate done\n",
      "pool 55 task 4 simulate done\n",
      "pool 55 task 5 simulate done\n",
      "pool 55 task 6 simulate done\n",
      "pool 55 task 7 simulate done\n",
      "pool 55 task 8 simulate done\n",
      "pool 55 task 9 simulate done\n",
      "pool 56 task 9 post done\n",
      "pool 56 task 0 simulate done\n",
      "pool 56 task 1 simulate done\n",
      "pool 56 task 2 simulate done\n",
      "pool 56 task 3 simulate done\n",
      "pool 56 task 4 simulate done\n",
      "pool 56 task 5 simulate done\n",
      "pool 56 task 6 simulate done\n",
      "pool 56 task 7 simulate done\n",
      "pool 56 task 8 simulate done\n",
      "pool 56 task 9 simulate done\n",
      "pool 57 task 9 post done\n",
      "pool 57 task 0 simulate done\n",
      "pool 57 task 1 simulate done\n",
      "pool 57 task 2 simulate done\n",
      "pool 57 task 3 simulate done\n",
      "pool 57 task 4 simulate done\n",
      "pool 57 task 5 simulate done\n",
      "pool 57 task 6 simulate done\n",
      "pool 57 task 7 simulate done\n",
      "pool 57 task 8 simulate done\n",
      "pool 57 task 9 simulate done\n",
      "pool 58 task 9 post done\n",
      "pool 58 task 0 simulate done\n",
      "pool 58 task 1 simulate done\n",
      "pool 58 task 2 simulate done\n",
      "pool 58 task 3 simulate done\n",
      "pool 58 task 4 simulate done\n",
      "pool 58 task 5 simulate done\n",
      "pool 58 task 6 simulate done\n",
      "pool 58 task 7 simulate done\n",
      "pool 58 task 8 simulate done\n",
      "pool 58 task 9 simulate done\n",
      "pool 59 task 9 post done\n",
      "pool 59 task 0 simulate done\n",
      "pool 59 task 1 simulate done\n",
      "pool 59 task 2 simulate done\n",
      "pool 59 task 3 simulate done\n",
      "pool 59 task 4 simulate done\n",
      "pool 59 task 5 simulate done\n",
      "pool 59 task 6 simulate done\n",
      "pool 59 task 7 simulate done\n",
      "pool 59 task 8 simulate done\n",
      "pool 59 task 9 simulate done\n",
      "pool 60 task 9 post done\n",
      "pool 60 task 0 simulate done\n",
      "pool 60 task 1 simulate done\n",
      "pool 60 task 2 simulate done\n",
      "pool 60 task 3 simulate done\n",
      "pool 60 task 4 simulate done\n",
      "pool 60 task 5 simulate done\n",
      "pool 60 task 6 simulate done\n",
      "pool 60 task 7 simulate done\n",
      "pool 60 task 8 simulate done\n",
      "pool 60 task 9 simulate done\n",
      "pool 61 task 9 post done\n",
      "pool 61 task 0 simulate done\n",
      "pool 61 task 1 simulate done\n",
      "pool 61 task 2 simulate done\n",
      "pool 61 task 3 simulate done\n",
      "pool 61 task 4 simulate done\n",
      "pool 61 task 5 simulate done\n",
      "pool 61 task 6 simulate done\n",
      "pool 61 task 7 simulate done\n",
      "pool 61 task 8 simulate done\n",
      "pool 61 task 9 simulate done\n",
      "pool 62 task 9 post done\n",
      "pool 62 task 0 simulate done\n",
      "pool 62 task 1 simulate done\n",
      "pool 62 task 2 simulate done\n",
      "pool 62 task 3 simulate done\n",
      "pool 62 task 4 simulate done\n",
      "pool 62 task 5 simulate done\n",
      "pool 62 task 6 simulate done\n",
      "pool 62 task 7 simulate done\n",
      "pool 62 task 8 simulate done\n",
      "pool 62 task 9 simulate done\n",
      "pool 63 task 9 post done\n",
      "pool 63 task 0 simulate done\n",
      "pool 63 task 1 simulate done\n",
      "pool 63 task 2 simulate done\n",
      "pool 63 task 3 simulate done\n",
      "pool 63 task 4 simulate done\n",
      "pool 63 task 5 simulate done\n",
      "pool 63 task 6 simulate done\n",
      "pool 63 task 7 simulate done\n",
      "pool 63 task 8 simulate done\n",
      "pool 63 task 9 simulate done\n",
      "pool 64 task 9 post done\n",
      "pool 64 task 0 simulate done\n",
      "pool 64 task 1 simulate done\n",
      "pool 64 task 2 simulate done\n",
      "pool 64 task 3 simulate done\n",
      "pool 64 task 4 simulate done\n",
      "pool 64 task 5 simulate done\n",
      "pool 64 task 6 simulate done\n",
      "pool 64 task 7 simulate done\n",
      "pool 64 task 8 simulate done\n",
      "pool 64 task 9 simulate done\n",
      "pool 65 task 9 post done\n",
      "pool 65 task 0 simulate done\n",
      "pool 65 task 1 simulate done\n",
      "pool 65 task 2 simulate done\n",
      "pool 65 task 3 simulate done\n",
      "pool 65 task 4 simulate done\n",
      "pool 65 task 5 simulate done\n",
      "pool 65 task 6 simulate done\n",
      "pool 65 task 7 simulate done\n",
      "pool 65 task 8 simulate done\n",
      "pool 65 task 9 simulate done\n",
      "pool 66 task 9 post done\n",
      "pool 66 task 0 simulate done\n",
      "pool 66 task 1 simulate done\n",
      "pool 66 task 2 simulate done\n",
      "pool 66 task 3 simulate done\n",
      "pool 66 task 4 simulate done\n",
      "pool 66 task 5 simulate done\n",
      "pool 66 task 6 simulate done\n",
      "pool 66 task 7 simulate done\n",
      "pool 66 task 8 simulate done\n",
      "pool 66 task 9 simulate done\n",
      "pool 67 task 9 post done\n",
      "pool 67 task 0 simulate done\n",
      "pool 67 task 1 simulate done\n",
      "pool 67 task 2 simulate done\n",
      "pool 67 task 3 simulate done\n",
      "pool 67 task 4 simulate done\n",
      "pool 67 task 5 simulate done\n",
      "pool 67 task 6 simulate done\n",
      "pool 67 task 7 simulate done\n",
      "pool 67 task 8 simulate done\n",
      "pool 67 task 9 simulate done\n",
      "pool 68 task 9 post done\n",
      "pool 68 task 0 simulate done\n",
      "pool 68 task 1 simulate done\n",
      "pool 68 task 2 simulate done\n",
      "pool 68 task 3 simulate done\n",
      "pool 68 task 4 simulate done\n",
      "pool 68 task 5 simulate done\n",
      "pool 68 task 6 simulate done\n",
      "pool 68 task 7 simulate done\n",
      "pool 68 task 8 simulate done\n",
      "pool 68 task 9 simulate done\n",
      "pool 69 task 9 post done\n",
      "pool 69 task 0 simulate done\n",
      "pool 69 task 1 simulate done\n",
      "pool 69 task 2 simulate done\n",
      "pool 69 task 3 simulate done\n",
      "pool 69 task 4 simulate done\n",
      "pool 69 task 5 simulate done\n",
      "pool 69 task 6 simulate done\n",
      "pool 69 task 7 simulate done\n",
      "pool 69 task 8 simulate done\n",
      "pool 69 task 9 simulate done\n",
      "pool 70 task 9 post done\n",
      "pool 70 task 0 simulate done\n",
      "pool 70 task 1 simulate done\n",
      "pool 70 task 2 simulate done\n",
      "pool 70 task 3 simulate done\n",
      "pool 70 task 4 simulate done\n",
      "pool 70 task 5 simulate done\n",
      "pool 70 task 6 simulate done\n",
      "pool 70 task 7 simulate done\n",
      "pool 70 task 8 simulate done\n",
      "pool 70 task 9 simulate done\n",
      "pool 71 task 9 post done\n",
      "pool 71 task 0 simulate done\n",
      "pool 71 task 1 simulate done\n",
      "pool 71 task 2 simulate done\n",
      "pool 71 task 3 simulate done\n",
      "pool 71 task 4 simulate done\n",
      "pool 71 task 5 simulate done\n",
      "pool 71 task 6 simulate done\n",
      "pool 71 task 7 simulate done\n",
      "pool 71 task 8 simulate done\n",
      "pool 71 task 9 simulate done\n",
      "pool 72 task 9 post done\n",
      "pool 72 task 0 simulate done\n",
      "pool 72 task 1 simulate done\n",
      "pool 72 task 2 simulate done\n",
      "pool 72 task 3 simulate done\n",
      "pool 72 task 4 simulate done\n",
      "pool 72 task 5 simulate done\n",
      "pool 72 task 6 simulate done\n",
      "pool 72 task 7 simulate done\n",
      "pool 72 task 8 simulate done\n",
      "pool 72 task 9 simulate done\n",
      "pool 73 task 9 post done\n",
      "pool 73 task 0 simulate done\n",
      "pool 73 task 1 simulate done\n",
      "pool 73 task 2 simulate done\n",
      "pool 73 task 3 simulate done\n",
      "pool 73 task 4 simulate done\n",
      "pool 73 task 5 simulate done\n",
      "pool 73 task 6 simulate done\n",
      "pool 73 task 7 simulate done\n",
      "pool 73 task 8 simulate done\n",
      "pool 73 task 9 simulate done\n",
      "pool 74 task 9 post done\n",
      "pool 74 task 0 simulate done\n",
      "pool 74 task 1 simulate done\n",
      "pool 74 task 2 simulate done\n",
      "pool 74 task 3 simulate done\n",
      "pool 74 task 4 simulate done\n",
      "pool 74 task 5 simulate done\n",
      "pool 74 task 6 simulate done\n",
      "pool 74 task 7 simulate done\n",
      "pool 74 task 8 simulate done\n",
      "pool 74 task 9 simulate done\n",
      "pool 75 task 9 post done\n",
      "pool 75 task 0 simulate done\n",
      "pool 75 task 1 simulate done\n",
      "pool 75 task 2 simulate done\n",
      "pool 75 task 3 simulate done\n",
      "pool 75 task 4 simulate done\n",
      "pool 75 task 5 simulate done\n",
      "pool 75 task 6 simulate done\n",
      "pool 75 task 7 simulate done\n",
      "pool 75 task 8 simulate done\n",
      "pool 75 task 9 simulate done\n",
      "pool 76 task 9 post done\n",
      "pool 76 task 0 simulate done\n",
      "pool 76 task 1 simulate done\n",
      "pool 76 task 2 simulate done\n",
      "pool 76 task 3 simulate done\n",
      "pool 76 task 4 simulate done\n",
      "pool 76 task 5 simulate done\n",
      "pool 76 task 6 simulate done\n",
      "pool 76 task 7 simulate done\n",
      "pool 76 task 8 simulate done\n",
      "pool 76 task 9 simulate done\n",
      "pool 77 task 9 post done\n",
      "pool 77 task 0 simulate done\n",
      "pool 77 task 1 simulate done\n",
      "pool 77 task 2 simulate done\n",
      "pool 77 task 3 simulate done\n",
      "pool 77 task 4 simulate done\n",
      "pool 77 task 5 simulate done\n",
      "pool 77 task 6 simulate done\n",
      "pool 77 task 7 simulate done\n",
      "pool 77 task 8 simulate done\n",
      "pool 77 task 9 simulate done\n",
      "pool 78 task 9 post done\n",
      "pool 78 task 0 simulate done\n",
      "pool 78 task 1 simulate done\n",
      "pool 78 task 2 simulate done\n",
      "pool 78 task 3 simulate done\n",
      "pool 78 task 4 simulate done\n",
      "pool 78 task 5 simulate done\n",
      "pool 78 task 6 simulate done\n",
      "pool 78 task 7 simulate done\n",
      "pool 78 task 8 simulate done\n",
      "pool 78 task 9 simulate done\n",
      "pool 79 task 9 post done\n",
      "pool 79 task 0 simulate done\n",
      "pool 79 task 1 simulate done\n",
      "pool 79 task 2 simulate done\n",
      "pool 79 task 3 simulate done\n",
      "pool 79 task 4 simulate done\n",
      "pool 79 task 5 simulate done\n",
      "pool 79 task 6 simulate done\n",
      "pool 79 task 7 simulate done\n",
      "pool 79 task 8 simulate done\n",
      "pool 79 task 9 simulate done\n",
      "pool 80 task 9 post done\n",
      "pool 80 task 0 simulate done\n",
      "pool 80 task 1 simulate done\n",
      "pool 80 task 2 simulate done\n",
      "pool 80 task 3 simulate done\n",
      "pool 80 task 4 simulate done\n",
      "pool 80 task 5 simulate done\n",
      "pool 80 task 6 simulate done\n",
      "pool 80 task 7 simulate done\n",
      "pool 80 task 8 simulate done\n",
      "pool 80 task 9 simulate done\n",
      "pool 81 task 9 post done\n",
      "pool 81 task 0 simulate done\n",
      "pool 81 task 1 simulate done\n",
      "pool 81 task 2 simulate done\n",
      "pool 81 task 3 simulate done\n",
      "pool 81 task 4 simulate done\n",
      "pool 81 task 5 simulate done\n",
      "pool 81 task 6 simulate done\n",
      "pool 81 task 7 simulate done\n",
      "pool 81 task 8 simulate done\n",
      "pool 81 task 9 simulate done\n",
      "pool 82 task 9 post done\n",
      "pool 82 task 0 simulate done\n",
      "pool 82 task 1 simulate done\n",
      "pool 82 task 2 simulate done\n",
      "pool 82 task 3 simulate done\n",
      "pool 82 task 4 simulate done\n",
      "pool 82 task 5 simulate done\n",
      "pool 82 task 6 simulate done\n",
      "pool 82 task 7 simulate done\n",
      "pool 82 task 8 simulate done\n",
      "pool 82 task 9 simulate done\n",
      "pool 83 task 9 post done\n",
      "pool 83 task 0 simulate done\n",
      "pool 83 task 1 simulate done\n",
      "pool 83 task 2 simulate done\n",
      "pool 83 task 3 simulate done\n",
      "pool 83 task 4 simulate done\n",
      "pool 83 task 5 simulate done\n",
      "pool 83 task 6 simulate done\n",
      "pool 83 task 7 simulate done\n",
      "pool 83 task 8 simulate done\n",
      "pool 83 task 9 simulate done\n",
      "pool 84 task 9 post done\n",
      "pool 84 task 0 simulate done\n",
      "pool 84 task 1 simulate done\n",
      "pool 84 task 2 simulate done\n",
      "pool 84 task 3 simulate done\n",
      "pool 84 task 4 simulate done\n",
      "pool 84 task 5 simulate done\n",
      "pool 84 task 6 simulate done\n",
      "pool 84 task 7 simulate done\n",
      "pool 84 task 8 simulate done\n",
      "pool 84 task 9 simulate done\n",
      "pool 85 task 9 post done\n",
      "pool 85 task 0 simulate done\n",
      "pool 85 task 1 simulate done\n",
      "pool 85 task 2 simulate done\n",
      "pool 85 task 3 simulate done\n",
      "pool 85 task 4 simulate done\n",
      "pool 85 task 5 simulate done\n",
      "pool 85 task 6 simulate done\n",
      "pool 85 task 7 simulate done\n",
      "pool 85 task 8 simulate done\n",
      "pool 85 task 9 simulate done\n",
      "pool 86 task 9 post done\n",
      "pool 86 task 0 simulate done\n",
      "pool 86 task 1 simulate done\n",
      "pool 86 task 2 simulate done\n",
      "pool 86 task 3 simulate done\n",
      "pool 86 task 4 simulate done\n",
      "pool 86 task 5 simulate done\n",
      "pool 86 task 6 simulate done\n",
      "pool 86 task 7 simulate done\n",
      "pool 86 task 8 simulate done\n",
      "pool 86 task 9 simulate done\n",
      "pool 87 task 9 post done\n",
      "pool 87 task 0 simulate done\n",
      "pool 87 task 1 simulate done\n",
      "pool 87 task 2 simulate done\n",
      "pool 87 task 3 simulate done\n",
      "pool 87 task 4 simulate done\n",
      "pool 87 task 5 simulate done\n",
      "pool 87 task 6 simulate done\n",
      "pool 87 task 7 simulate done\n",
      "pool 87 task 8 simulate done\n",
      "pool 87 task 9 simulate done\n",
      "pool 88 task 9 post done\n",
      "pool 88 task 0 simulate done\n",
      "pool 88 task 1 simulate done\n",
      "pool 88 task 2 simulate done\n",
      "pool 88 task 3 simulate done\n",
      "pool 88 task 4 simulate done\n",
      "pool 88 task 5 simulate done\n",
      "pool 88 task 6 simulate done\n",
      "pool 88 task 7 simulate done\n",
      "pool 88 task 8 simulate done\n",
      "pool 88 task 9 simulate done\n",
      "pool 89 task 9 post done\n",
      "pool 89 task 0 simulate done\n",
      "pool 89 task 1 simulate done\n",
      "pool 89 task 2 simulate done\n",
      "pool 89 task 3 simulate done\n",
      "pool 89 task 4 simulate done\n",
      "pool 89 task 5 simulate done\n",
      "pool 89 task 6 simulate done\n",
      "pool 89 task 7 simulate done\n",
      "pool 89 task 8 simulate done\n",
      "pool 89 task 9 simulate done\n",
      "pool 90 task 9 post done\n",
      "pool 90 task 0 simulate done\n",
      "pool 90 task 1 simulate done\n",
      "pool 90 task 2 simulate done\n",
      "pool 90 task 3 simulate done\n",
      "pool 90 task 4 simulate done\n",
      "pool 90 task 5 simulate done\n",
      "pool 90 task 6 simulate done\n",
      "pool 90 task 7 simulate done\n",
      "pool 90 task 8 simulate done\n",
      "pool 90 task 9 simulate done\n",
      "pool 91 task 9 post done\n",
      "pool 91 task 0 simulate done\n",
      "pool 91 task 1 simulate done\n",
      "pool 91 task 2 simulate done\n",
      "pool 91 task 3 simulate done\n",
      "pool 91 task 4 simulate done\n",
      "pool 91 task 5 simulate done\n",
      "pool 91 task 6 simulate done\n",
      "pool 91 task 7 simulate done\n",
      "pool 91 task 8 simulate done\n",
      "pool 91 task 9 simulate done\n",
      "pool 92 task 9 post done\n",
      "pool 92 task 0 simulate done\n",
      "pool 92 task 1 simulate done\n",
      "pool 92 task 2 simulate done\n",
      "pool 92 task 3 simulate done\n",
      "pool 92 task 4 simulate done\n",
      "pool 92 task 5 simulate done\n",
      "pool 92 task 6 simulate done\n",
      "pool 92 task 7 simulate done\n",
      "pool 92 task 8 simulate done\n",
      "pool 92 task 9 simulate done\n",
      "pool 93 task 9 post done\n",
      "pool 93 task 0 simulate done\n",
      "pool 93 task 1 simulate done\n",
      "pool 93 task 2 simulate done\n",
      "pool 93 task 3 simulate done\n",
      "pool 93 task 4 simulate done\n",
      "pool 93 task 5 simulate done\n",
      "pool 93 task 6 simulate done\n",
      "pool 93 task 7 simulate done\n",
      "pool 93 task 8 simulate done\n",
      "pool 93 task 9 simulate done\n",
      "pool 94 task 9 post done\n",
      "pool 94 task 0 simulate done\n",
      "pool 94 task 1 simulate done\n",
      "pool 94 task 2 simulate done\n",
      "pool 94 task 3 simulate done\n",
      "pool 94 task 4 simulate done\n",
      "pool 94 task 5 simulate done\n",
      "pool 94 task 6 simulate done\n",
      "pool 94 task 7 simulate done\n",
      "pool 94 task 8 simulate done\n",
      "pool 94 task 9 simulate done\n",
      "pool 95 task 9 post done\n",
      "pool 95 task 0 simulate done\n",
      "pool 95 task 1 simulate done\n",
      "pool 95 task 2 simulate done\n",
      "pool 95 task 3 simulate done\n",
      "pool 95 task 4 simulate done\n",
      "pool 95 task 5 simulate done\n",
      "pool 95 task 6 simulate done\n",
      "pool 95 task 7 simulate done\n",
      "pool 95 task 8 simulate done\n",
      "pool 95 task 9 simulate done\n",
      "pool 96 task 9 post done\n",
      "pool 96 task 0 simulate done\n",
      "pool 96 task 1 simulate done\n",
      "pool 96 task 2 simulate done\n",
      "pool 96 task 3 simulate done\n",
      "pool 96 task 4 simulate done\n",
      "pool 96 task 5 simulate done\n",
      "pool 96 task 6 simulate done\n",
      "pool 96 task 7 simulate done\n",
      "pool 96 task 8 simulate done\n",
      "pool 96 task 9 simulate done\n",
      "pool 97 task 9 post done\n",
      "pool 97 task 0 simulate done\n",
      "pool 97 task 1 simulate done\n",
      "pool 97 task 2 simulate done\n",
      "pool 97 task 3 simulate done\n",
      "pool 97 task 4 simulate done\n",
      "pool 97 task 5 simulate done\n",
      "pool 97 task 6 simulate done\n",
      "pool 97 task 7 simulate done\n",
      "pool 97 task 8 simulate done\n",
      "pool 97 task 9 simulate done\n",
      "pool 98 task 9 post done\n",
      "pool 98 task 0 simulate done\n",
      "pool 98 task 1 simulate done\n",
      "pool 98 task 2 simulate done\n",
      "pool 98 task 3 simulate done\n",
      "pool 98 task 4 simulate done\n",
      "pool 98 task 5 simulate done\n",
      "pool 98 task 6 simulate done\n",
      "pool 98 task 7 simulate done\n",
      "pool 98 task 8 simulate done\n",
      "pool 98 task 9 simulate done\n",
      "pool 99 task 9 post done\n",
      "pool 99 task 0 simulate done\n",
      "pool 99 task 1 simulate done\n",
      "pool 99 task 2 simulate done\n",
      "pool 99 task 3 simulate done\n",
      "pool 99 task 4 simulate done\n",
      "pool 99 task 5 simulate done\n",
      "pool 99 task 6 simulate done\n",
      "pool 99 task 7 simulate done\n",
      "pool 99 task 8 simulate done\n",
      "pool 99 task 9 simulate done\n",
      "pool 100 task 9 post done\n",
      "Not complete : https://api.worldquantbrain.com/simulations/2p1a8i2PO5aBcj4tI7fbuzr\n",
      "other\n",
      "pool 100 task 0 simulate done\n",
      "Not complete : https://api.worldquantbrain.com/simulations/3vBaKt3JQ4sYb8fJkS8nLW7\n",
      "other\n",
      "pool 100 task 1 simulate done\n",
      "Not complete : https://api.worldquantbrain.com/simulations/1vcUgQfzg5iw9ZT1gBlKQW2q\n",
      "other\n",
      "pool 100 task 2 simulate done\n",
      "Not complete : https://api.worldquantbrain.com/simulations/3Irefvb9x4sL8xdKshhi5mS\n",
      "other\n",
      "pool 100 task 3 simulate done\n",
      "Not complete : https://api.worldquantbrain.com/simulations/19iLKr2r04UGaDHIrO46TUB\n",
      "other\n",
      "pool 100 task 4 simulate done\n",
      "Not complete : https://api.worldquantbrain.com/simulations/1dpxoWerk5bkb6LzXvw70Vy\n",
      "other\n",
      "pool 100 task 5 simulate done\n",
      "Not complete : https://api.worldquantbrain.com/simulations/qL774TC4q5bdkzt8JZJ3A\n",
      "other\n",
      "pool 100 task 6 simulate done\n",
      "Not complete : https://api.worldquantbrain.com/simulations/3NyL0e5Lk4UzbYAqi7bCLJF\n",
      "other\n",
      "pool 100 task 7 simulate done\n",
      "Not complete : https://api.worldquantbrain.com/simulations/1Qbl4f5SY5cP9MJuqJLAnWI\n",
      "other\n",
      "pool 100 task 8 simulate done\n",
      "Not complete : https://api.worldquantbrain.com/simulations/sBfbvbyY5aQcHOileycxRz\n",
      "other\n",
      "pool 100 task 9 simulate done\n",
      "loc key error\n",
      "b'{\"user\":{\"id\":\"JW80368\"},\"token\":{\"expiry\":14400.0},\"permissions\":[\"CONSULTANT\",\"MULTI_SIMULATION\",\"PROD_ALPHAS\",\"REFERRAL\",\"SUPER_ALPHA\",\"VISUALIZATION\",\"WORKDAY\"]}'\n",
      "pool 101 task 9 post done\n",
      "pool 101 task 0 simulate done\n",
      "pool 101 task 1 simulate done\n",
      "pool 101 task 2 simulate done\n",
      "pool 101 task 3 simulate done\n",
      "pool 101 task 4 simulate done\n",
      "pool 101 task 5 simulate done\n",
      "pool 101 task 6 simulate done\n",
      "pool 101 task 7 simulate done\n",
      "pool 101 task 8 simulate done\n",
      "pool 102 task 9 post done\n",
      "pool 102 task 0 simulate done\n",
      "pool 102 task 1 simulate done\n",
      "pool 102 task 2 simulate done\n",
      "pool 102 task 3 simulate done\n",
      "pool 102 task 4 simulate done\n",
      "pool 102 task 5 simulate done\n",
      "pool 102 task 6 simulate done\n",
      "pool 102 task 7 simulate done\n",
      "pool 102 task 8 simulate done\n",
      "pool 102 task 9 simulate done\n",
      "pool 103 task 9 post done\n",
      "pool 103 task 0 simulate done\n",
      "pool 103 task 1 simulate done\n",
      "pool 103 task 2 simulate done\n",
      "pool 103 task 3 simulate done\n",
      "pool 103 task 4 simulate done\n",
      "pool 103 task 5 simulate done\n",
      "pool 103 task 6 simulate done\n",
      "pool 103 task 7 simulate done\n",
      "pool 103 task 8 simulate done\n",
      "pool 103 task 9 simulate done\n",
      "pool 104 task 9 post done\n",
      "pool 104 task 0 simulate done\n",
      "pool 104 task 1 simulate done\n",
      "pool 104 task 2 simulate done\n",
      "pool 104 task 3 simulate done\n",
      "pool 104 task 4 simulate done\n",
      "pool 104 task 5 simulate done\n",
      "pool 104 task 6 simulate done\n",
      "pool 104 task 7 simulate done\n",
      "pool 104 task 8 simulate done\n",
      "pool 104 task 9 simulate done\n",
      "pool 105 task 9 post done\n",
      "pool 105 task 0 simulate done\n",
      "pool 105 task 1 simulate done\n",
      "pool 105 task 2 simulate done\n",
      "pool 105 task 3 simulate done\n",
      "pool 105 task 4 simulate done\n",
      "pool 105 task 5 simulate done\n",
      "pool 105 task 6 simulate done\n",
      "pool 105 task 7 simulate done\n",
      "pool 105 task 8 simulate done\n",
      "pool 105 task 9 simulate done\n",
      "pool 106 task 9 post done\n",
      "pool 106 task 0 simulate done\n",
      "pool 106 task 1 simulate done\n",
      "pool 106 task 2 simulate done\n",
      "pool 106 task 3 simulate done\n",
      "pool 106 task 4 simulate done\n",
      "pool 106 task 5 simulate done\n",
      "pool 106 task 6 simulate done\n",
      "pool 106 task 7 simulate done\n",
      "pool 106 task 8 simulate done\n",
      "pool 106 task 9 simulate done\n",
      "pool 107 task 9 post done\n",
      "pool 107 task 0 simulate done\n",
      "pool 107 task 1 simulate done\n",
      "pool 107 task 2 simulate done\n",
      "pool 107 task 3 simulate done\n",
      "pool 107 task 4 simulate done\n",
      "pool 107 task 5 simulate done\n",
      "pool 107 task 6 simulate done\n",
      "pool 107 task 7 simulate done\n",
      "pool 107 task 8 simulate done\n",
      "pool 107 task 9 simulate done\n",
      "pool 108 task 9 post done\n",
      "pool 108 task 0 simulate done\n",
      "pool 108 task 1 simulate done\n",
      "pool 108 task 2 simulate done\n",
      "pool 108 task 3 simulate done\n",
      "pool 108 task 4 simulate done\n",
      "pool 108 task 5 simulate done\n",
      "pool 108 task 6 simulate done\n",
      "pool 108 task 7 simulate done\n",
      "pool 108 task 8 simulate done\n",
      "pool 108 task 9 simulate done\n",
      "pool 109 task 9 post done\n",
      "pool 109 task 0 simulate done\n",
      "pool 109 task 1 simulate done\n",
      "pool 109 task 2 simulate done\n",
      "pool 109 task 3 simulate done\n",
      "pool 109 task 4 simulate done\n",
      "pool 109 task 5 simulate done\n",
      "pool 109 task 6 simulate done\n",
      "pool 109 task 7 simulate done\n",
      "pool 109 task 8 simulate done\n",
      "pool 109 task 9 simulate done\n",
      "pool 110 task 9 post done\n",
      "pool 110 task 0 simulate done\n",
      "pool 110 task 1 simulate done\n",
      "pool 110 task 2 simulate done\n",
      "pool 110 task 3 simulate done\n",
      "pool 110 task 4 simulate done\n",
      "pool 110 task 5 simulate done\n",
      "pool 110 task 6 simulate done\n",
      "pool 110 task 7 simulate done\n",
      "pool 110 task 8 simulate done\n",
      "pool 110 task 9 simulate done\n",
      "pool 111 task 9 post done\n",
      "pool 111 task 0 simulate done\n",
      "pool 111 task 1 simulate done\n",
      "pool 111 task 2 simulate done\n",
      "pool 111 task 3 simulate done\n",
      "pool 111 task 4 simulate done\n",
      "pool 111 task 5 simulate done\n",
      "pool 111 task 6 simulate done\n",
      "pool 111 task 7 simulate done\n",
      "pool 111 task 8 simulate done\n",
      "pool 111 task 9 simulate done\n",
      "pool 112 task 9 post done\n",
      "pool 112 task 0 simulate done\n",
      "pool 112 task 1 simulate done\n",
      "pool 112 task 2 simulate done\n",
      "pool 112 task 3 simulate done\n",
      "pool 112 task 4 simulate done\n",
      "pool 112 task 5 simulate done\n",
      "pool 112 task 6 simulate done\n",
      "pool 112 task 7 simulate done\n",
      "pool 112 task 8 simulate done\n",
      "pool 112 task 9 simulate done\n",
      "pool 113 task 9 post done\n",
      "pool 113 task 0 simulate done\n",
      "pool 113 task 1 simulate done\n",
      "pool 113 task 2 simulate done\n",
      "pool 113 task 3 simulate done\n",
      "pool 113 task 4 simulate done\n",
      "pool 113 task 5 simulate done\n",
      "pool 113 task 6 simulate done\n",
      "pool 113 task 7 simulate done\n",
      "pool 113 task 8 simulate done\n",
      "pool 113 task 9 simulate done\n",
      "pool 114 task 9 post done\n",
      "pool 114 task 0 simulate done\n",
      "pool 114 task 1 simulate done\n",
      "pool 114 task 2 simulate done\n",
      "pool 114 task 3 simulate done\n",
      "pool 114 task 4 simulate done\n",
      "pool 114 task 5 simulate done\n",
      "pool 114 task 6 simulate done\n",
      "pool 114 task 7 simulate done\n",
      "pool 114 task 8 simulate done\n",
      "pool 114 task 9 simulate done\n",
      "pool 115 task 9 post done\n",
      "pool 115 task 0 simulate done\n",
      "pool 115 task 1 simulate done\n",
      "pool 115 task 2 simulate done\n",
      "pool 115 task 3 simulate done\n",
      "pool 115 task 4 simulate done\n",
      "pool 115 task 5 simulate done\n",
      "pool 115 task 6 simulate done\n",
      "pool 115 task 7 simulate done\n",
      "pool 115 task 8 simulate done\n",
      "pool 115 task 9 simulate done\n",
      "pool 116 task 9 post done\n",
      "pool 116 task 0 simulate done\n",
      "pool 116 task 1 simulate done\n",
      "pool 116 task 2 simulate done\n",
      "pool 116 task 3 simulate done\n",
      "pool 116 task 4 simulate done\n",
      "pool 116 task 5 simulate done\n",
      "pool 116 task 6 simulate done\n",
      "pool 116 task 7 simulate done\n",
      "pool 116 task 8 simulate done\n",
      "pool 116 task 9 simulate done\n",
      "pool 117 task 9 post done\n",
      "pool 117 task 0 simulate done\n",
      "pool 117 task 1 simulate done\n",
      "pool 117 task 2 simulate done\n",
      "pool 117 task 3 simulate done\n",
      "pool 117 task 4 simulate done\n",
      "pool 117 task 5 simulate done\n",
      "pool 117 task 6 simulate done\n",
      "pool 117 task 7 simulate done\n",
      "pool 117 task 8 simulate done\n",
      "pool 117 task 9 simulate done\n",
      "pool 118 task 9 post done\n",
      "pool 118 task 0 simulate done\n",
      "pool 118 task 1 simulate done\n",
      "pool 118 task 2 simulate done\n",
      "pool 118 task 3 simulate done\n",
      "pool 118 task 4 simulate done\n",
      "pool 118 task 5 simulate done\n",
      "pool 118 task 6 simulate done\n",
      "pool 118 task 7 simulate done\n",
      "pool 118 task 8 simulate done\n",
      "pool 118 task 9 simulate done\n",
      "pool 119 task 9 post done\n",
      "pool 119 task 0 simulate done\n",
      "pool 119 task 1 simulate done\n",
      "pool 119 task 2 simulate done\n",
      "pool 119 task 3 simulate done\n",
      "pool 119 task 4 simulate done\n",
      "pool 119 task 5 simulate done\n",
      "pool 119 task 6 simulate done\n",
      "pool 119 task 7 simulate done\n",
      "pool 119 task 8 simulate done\n",
      "pool 119 task 9 simulate done\n",
      "pool 120 task 9 post done\n",
      "pool 120 task 0 simulate done\n",
      "pool 120 task 1 simulate done\n",
      "pool 120 task 2 simulate done\n",
      "pool 120 task 3 simulate done\n",
      "pool 120 task 4 simulate done\n",
      "pool 120 task 5 simulate done\n",
      "pool 120 task 6 simulate done\n",
      "pool 120 task 7 simulate done\n",
      "pool 120 task 8 simulate done\n",
      "pool 120 task 9 simulate done\n",
      "pool 121 task 9 post done\n",
      "pool 121 task 0 simulate done\n",
      "pool 121 task 1 simulate done\n",
      "pool 121 task 2 simulate done\n",
      "pool 121 task 3 simulate done\n",
      "pool 121 task 4 simulate done\n",
      "pool 121 task 5 simulate done\n",
      "pool 121 task 6 simulate done\n",
      "pool 121 task 7 simulate done\n",
      "pool 121 task 8 simulate done\n",
      "pool 121 task 9 simulate done\n",
      "pool 122 task 9 post done\n",
      "pool 122 task 0 simulate done\n",
      "pool 122 task 1 simulate done\n",
      "pool 122 task 2 simulate done\n",
      "pool 122 task 3 simulate done\n",
      "pool 122 task 4 simulate done\n",
      "pool 122 task 5 simulate done\n",
      "pool 122 task 6 simulate done\n",
      "pool 122 task 7 simulate done\n",
      "pool 122 task 8 simulate done\n",
      "pool 122 task 9 simulate done\n",
      "pool 123 task 9 post done\n",
      "pool 123 task 0 simulate done\n",
      "pool 123 task 1 simulate done\n",
      "pool 123 task 2 simulate done\n",
      "pool 123 task 3 simulate done\n",
      "pool 123 task 4 simulate done\n",
      "pool 123 task 5 simulate done\n",
      "pool 123 task 6 simulate done\n",
      "pool 123 task 7 simulate done\n",
      "pool 123 task 8 simulate done\n",
      "pool 123 task 9 simulate done\n",
      "pool 124 task 9 post done\n",
      "pool 124 task 0 simulate done\n",
      "pool 124 task 1 simulate done\n",
      "pool 124 task 2 simulate done\n",
      "pool 124 task 3 simulate done\n",
      "pool 124 task 4 simulate done\n",
      "pool 124 task 5 simulate done\n",
      "pool 124 task 6 simulate done\n",
      "pool 124 task 7 simulate done\n",
      "pool 124 task 8 simulate done\n",
      "pool 124 task 9 simulate done\n",
      "pool 125 task 9 post done\n",
      "pool 125 task 0 simulate done\n",
      "pool 125 task 1 simulate done\n",
      "pool 125 task 2 simulate done\n",
      "pool 125 task 3 simulate done\n",
      "pool 125 task 4 simulate done\n",
      "pool 125 task 5 simulate done\n",
      "pool 125 task 6 simulate done\n",
      "pool 125 task 7 simulate done\n",
      "pool 125 task 8 simulate done\n",
      "pool 125 task 9 simulate done\n",
      "pool 126 task 9 post done\n",
      "pool 126 task 0 simulate done\n",
      "pool 126 task 1 simulate done\n",
      "pool 126 task 2 simulate done\n",
      "pool 126 task 3 simulate done\n",
      "pool 126 task 4 simulate done\n",
      "pool 126 task 5 simulate done\n",
      "pool 126 task 6 simulate done\n",
      "pool 126 task 7 simulate done\n",
      "pool 126 task 8 simulate done\n",
      "pool 126 task 9 simulate done\n",
      "pool 127 task 9 post done\n",
      "pool 127 task 0 simulate done\n",
      "pool 127 task 1 simulate done\n",
      "pool 127 task 2 simulate done\n",
      "pool 127 task 3 simulate done\n",
      "pool 127 task 4 simulate done\n",
      "pool 127 task 5 simulate done\n",
      "pool 127 task 6 simulate done\n",
      "pool 127 task 7 simulate done\n",
      "pool 127 task 8 simulate done\n",
      "pool 127 task 9 simulate done\n",
      "pool 128 task 9 post done\n",
      "pool 128 task 0 simulate done\n",
      "pool 128 task 1 simulate done\n",
      "pool 128 task 2 simulate done\n",
      "pool 128 task 3 simulate done\n",
      "pool 128 task 4 simulate done\n",
      "pool 128 task 5 simulate done\n",
      "pool 128 task 6 simulate done\n",
      "pool 128 task 7 simulate done\n",
      "pool 128 task 8 simulate done\n",
      "pool 128 task 9 simulate done\n",
      "pool 129 task 9 post done\n",
      "pool 129 task 0 simulate done\n",
      "pool 129 task 1 simulate done\n",
      "pool 129 task 2 simulate done\n",
      "pool 129 task 3 simulate done\n",
      "pool 129 task 4 simulate done\n",
      "pool 129 task 5 simulate done\n",
      "pool 129 task 6 simulate done\n",
      "pool 129 task 7 simulate done\n",
      "pool 129 task 8 simulate done\n",
      "pool 129 task 9 simulate done\n",
      "pool 130 task 9 post done\n",
      "pool 130 task 0 simulate done\n"
     ]
    }
   ],
   "source": [
    "import os\n",
    "import pandas as pd\n",
    "# Regular one\n",
    "s = login()\n",
    "Running = True\n",
    "while Running:\n",
    "    csv_files = [f for f in os.listdir(\"./fo_alpha_list_1\") if f.endswith('.csv')]\n",
    "    if csv_files:\n",
    "        csv_files.sort(reverse=True)\n",
    "        next_csv_file = csv_files[0]\n",
    "        print(f\"next_csv_file: {next_csv_file}\")\n",
    "\n",
    "        try:\n",
    "            df_next_csv = pd.read_csv(f\"./fo_alpha_list_1/{next_csv_file}\")\n",
    "        except Exception as e:\n",
    "            print(f\"Error reading {next_csv_file}: {e}\")\n",
    "            continue\n",
    "\n",
    "        fo_alpha_list = []\n",
    "        for _, row in df_next_csv.iterrows():\n",
    "            fo_alpha_list.append((row['alpha'], int(row['decay'])))\n",
    "\n",
    "        pools = load_task_pool(fo_alpha_list, 10, 10)\n",
    "        print(f\"len of pools = {len(pools)}\")\n",
    "\n",
    "        file_name = next_csv_file.split(\".\")[0]\n",
    "        region = file_name.split(\"_\")[0]\n",
    "\n",
    "        if region == \"AMR\":\n",
    "            uni = \"TOP600\"\n",
    "        elif region == \"JPN\":\n",
    "            uni = \"TOP1600\"\n",
    "        elif region == \"USA\":\n",
    "            uni = \"TOP3000\"\n",
    "        elif region == \"ASI\":\n",
    "            uni = \"MINVOL1M\"\n",
    "        elif region == \"KOR\":\n",
    "            uni = \"TOP600\"\n",
    "        elif region == \"TWN\":\n",
    "            uni = \"TOP500\"\n",
    "        elif region == \"HKG\":\n",
    "            uni = \"TOP800\"\n",
    "        elif region == \"GLB\":\n",
    "            uni = \"TOP3000\"\n",
    "        elif region == \"CHN\":\n",
    "            uni = \"TOP2000U\"\n",
    "        elif region == \"EUR\":\n",
    "            uni = \"TOP1200\"\n",
    "        \n",
    "        if file_name.startswith(\"AMR\"):\n",
    "            multi_simulate(pools, \"SUBINDUSTRY\", region, uni, 17, file_name)\n",
    "        elif file_name == \"USA_fo_analyst39\":\n",
    "            multi_simulate(pools, \"SUBINDUSTRY\", region, uni, 7, file_name)\n",
    "        else:\n",
    "            multi_simulate(pools, \"SUBINDUSTRY\", region, uni, 0, file_name)\n",
    "        \n",
    "        try:\n",
    "            os.remove(f\"./fo_alpha_list_1/{next_csv_file}\")\n",
    "        except Exception as e:\n",
    "            print(f\"Error deleting {next_csv_file}: {e}\")\n",
    "            continue\n",
    "        \n",
    "        with open(\"log.txt\", \"a\") as log_file:\n",
    "            log_file.write(f\"{next_csv_file} done\\n\")\n",
    "    else:\n",
    "        Running = False\n",
    "        print(\"No more CSV files to process\")\n",
    "        break"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# GLB_fo_model109 63\n",
    "# ASI_fo_fundmental6 114\n",
    "# HKG_fo_fundamental6 139\n",
    "# GLB_fo_fundamental6 70\n",
    "# HKG_fo_fundamental4 133-220\n",
    "# JPN_fo_other466 68\n",
    "# EUR_fo_fundmental6 71"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
